const app = getApp();
const { fetch } = require('../../utils/util.js')
Page({
  data: {
    slides: [],
    designs: [],
  },
  onLoad: function (options) {
    const _this = this;
    // banner
    fetch({
      url: 'api/zhuang/GetBannerList',
      params: {},
      success: (res) => {
        _this.setData({
          slides: res
        })
      }
    })

    // 设计机构
    fetch({
      url: 'api/zhuang/GetSiteList',
      params: {},
      success: (res) => {
        console.log('设计机构Z：')
        console.log(res)
        if (res && res.items) {
          _this.setData({
            designs: res.items
          })
        }
      }
    });
  },
  linkpage: function (e) {
    app.pageTo(e.currentTarget.dataset.url)
  },
})